Migrate from A2A v0 to v1 (part 1)#1921
Conversation
|
Warning Testing pausedMonthly snapshot limit reached. Update your plan to get more snapshots and resume testing. |
4aae019 to
2cea435
Compare
There was a problem hiding this comment.
For reviewer, tracing context injection and associated tests have been moved to client_interceptors.go and client_interceptor_test.go (also where auth headers injection happens)
8943aff to
6350578
Compare
6350578 to
d60eec4
Compare
There was a problem hiding this comment.
For reviewer, this is a modified version of existing https://github.com/kagent-dev/kagent/blob/main/go/core/internal/a2a/manager.go (removed) for very similar functionality
This new passthrough handler is simpler and forwards RPC methods directly to the client and avoids having to go through things like task lifecycle, task status, etc. that the old AgentExecutor would do, and fits better since the controller is just a proxy to upstream agent runtime that handles the real executor.
|
@copilot review |
EItanya
left a comment
There was a problem hiding this comment.
These changes look awesome overall!
Can you potentially create a unified TODO marker for all changes which need to go in as a part of this migration so that it's clear when a change will be handled by a future PR, or needs to be. That way we can just do ctrl + shift + f and find all of them.
| _ int, | ||
| _ int, | ||
| _ time.Duration, |
There was a problem hiding this comment.
Does the new library not expose these? I remember these were very important to ensure larger streams/payloads weren't rejected
There was a problem hiding this comment.
The new library doesn't have direct options to set these, I think we can just use the default ones from the library, I found these:
const defaultRequestTimeout = 3 * time.Minute
// MaxSSETokenSize is the maximum size for SSE data lines (10MB).
// The default bufio.Scanner buffer of 64KB is insufficient for large payloads
MaxSSETokenSize = 10 * 1024 * 1024 // 10MBI'll remove these parameters
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
69e93c5 to
253191a
Compare
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
The 1st of 3 PRs for A2A v0 to v1 zero downtime migration. This will go into release 0.10.0
Makes the controller compatible with A2A v0 (trpc-a2a-go) and v1 (a2a-go) data and both v0 and v1 JSON-RPC routes / agent card routes depending on
A2A-Versionheader (designed explicitly by the protocol for version negotiations). Replaces all internal usages oftrpc-a2a-gowitha2a-goexcept in data conversion code and CLI client code.This ensure that the controller is compatible with old / existing agents and UI in A2A v0 and existing v0 data in db, while adding the capability to communicate with v1 agents and UI during upgrade as they are added in the next part.
Follows https://a2a-protocol.org/latest/whats-new-v1/#migration-strategy-recommendations and db conversion reuses as much of existing a2a backward compatible code as possible.